home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
Updates
/
PowerPC
/
pdflib
/
configure.in
< prev
next >
Wrap
Text File
|
2000-05-16
|
21KB
|
738 lines
dnl Configure.in script for PDFlib.
dnl Process this file with autoconf to produce a configure script.
dnl source directory sanity check using an arbitrary source file
AC_INIT(pdflib/p_basic.c)
VERSION="2.01"
WITH_CXX=nope
WITH_JAVA=nope
WITH_PERL=nope
WITH_PYTHON=nope
WITH_TCL=nope
dnl install-sh will be searched (and found) here
AC_CONFIG_AUX_DIR(util)
# Set name for machine-dependent library files
AC_SUBST(MACHDEP)
AC_MSG_CHECKING(MACHDEP)
if test -z "$MACHDEP"
then
if test -f /usr/lib/NextStep/software_version; then
set X `hostinfo | grep 'NeXT Mach.*:' | \
sed -e 's/://' -e 's/\./_/'` && \
ac_sys_system=next && ac_sys_release=$4
MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
else
ac_sys_system=`uname -s`
if test "$ac_sys_system" = "AIX" ; then
ac_sys_release=`uname -v`
else
ac_sys_release=`uname -r`
fi
ac_md_system=`echo $ac_sys_system |
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
ac_md_release=`echo $ac_sys_release |
tr -d '[/ ]' | sed 's/\..*//'`
MACHDEP="$ac_md_system$ac_md_release"
fi
case MACHDEP in
'') MACHDEP=unknown;;
esac
fi
AC_MSG_RESULT($MACHDEP)
# Default defines -- some systems may need special handling here
case $ac_sys_system/$ac_sys_release in
cyg*|CYG*) DEFINES="-U_WIN32 -UWIN32 -U__WIN32__ -U_Windows";;
*) DEFINES="";;
esac
# ---------- Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_RANLIB
# ---------- deselect C++ option
WITH_CXX="yes"
AC_ARG_WITH(cxx,[ --without-cxx Disable C++ test program],
[WITH_CXX="no"],
[WITH_CXX="yes"])
if test "$WITH_CXX" = "yes"; then
AC_PROG_CXX
AC_SUBST(CXX)
fi
# common stuff, unlikely to be changed
SHELL="/bin/sh"
# EXE must include the dot if used
case $ac_sys_system/$ac_sys_release in
cyg*|CYG*) EXE=".exe";;
*) EXE="";;
esac
# OBJ must _not_ include the dot
OBJ="o"
AR="ar rc"
RM="rm -f"
AC_SUBST(SHELL)
AC_SUBST(EXE)
AC_SUBST(OBJ)
AC_SUBST(AR)
AC_SUBST(VERSION)
AC_SUBST(CC)
AC_SUBST(RM)
# ---------- Checks for libraries.
# This borrowed from the Python configuration file
# Set info about shared libraries.
AC_SUBST(SO)
AC_SUBST(LDSHARED)
AC_SUBST(CCSHARED)
AC_SUBST(LINKFORSHARED)
# SO is the extension of shared libraries `(including the dot!)
# -- usually .so, .sl on HP-UX
AC_MSG_CHECKING(SO)
if test -z "$SO"
then
case $ac_sys_system/$ac_sys_release in
hp*|HP*) SO=.sl;;
NeXT/3*|next/3*) SO=.a;; # no shared libs on NeXT 3.3 and less
cyg*|CYG*) SO=.dll;;
*) SO=.so;;
esac
fi
AC_MSG_RESULT($SO)
# LDSHARED is the ld *command* used to create shared library
# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
AC_MSG_CHECKING(LDSHARED)
if test -z "$LDSHARED"
then
case $ac_sys_system/$ac_sys_release in
AIX*) LDSHARED="ld_so_aix";;
IRIX*) LDSHARED="ld -shared";;
SunOS/4*) LDSHARED="ld";;
SunOS/5*) LDSHARED="ld -G";;
hp*|HP*) LDSHARED="ld -b";;
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
DYNIX/ptx*) LDSHARED="ld -G";;
Linux*) LDSHARED="gcc -shared";;
FreeBSD*) LDSHARED="ld -Bshareable";;
NetBSD*) LDSHARED="ld -Bshareable -Bdynamic -x";;
NeXT|next/3*) LDSHARED="ld -u libsys_s";;
NeXT|next/4*) LDSHARED="cc -nostdlib -r ";;
SCO_SV*) LDSHARED="ld -G";;
cyg*|CYG*) LDSHARED="dllwrap --export-all --driver-name gcc --output-def libpdf$VERSION.def --implib libpdf$VERSION.a ";;
*) LDSHARED="ld";;
esac
fi
AC_MSG_RESULT($LDSHARED)
# CCSHARED are the C *flags* used to create objects to go into a shared
# library -- this is only needed for a few systems
AC_MSG_CHECKING(CCSHARED)
if test -z "$CCSHARED"
then
case $ac_sys_system in
hp*|HP*) if test "$GCC" = yes;
then CCSHARED="-fpic";
else CCSHARED="+z";
fi;;
Linux*) CCSHARED="-fpic";;
SCO_SV*) CCSHARED="-Kpic -belf";;
FreeBSD*) CCSHARED="-fpic";;
NetBSD*) CCSHARED="-fpic";;
cyg*|CYG*) CCSHARED="-DBUILDING_DLL=1";;
esac
fi
AC_MSG_RESULT($CCSHARED)
# ---------- select debugging configuration
WITH_DEBUG="no"
AC_ARG_WITH(debug,[ --with-debug Enable debugging configuration (implies static)],[WITH_DEBUG="yes"], [WITH_DEBUG="no"])
# ---------- select static library (shared is default for most systems)
# Filter systems which don't support shared libraries
case $ac_sys_system/$ac_sys_release in
NeXT|next/3*) WITH_STATIC="no";;
*) WITH_STATIC="yes";;
esac
AC_ARG_WITH(static,[ --with-static Enable building the static library],[WITH_STATIC="yes"], [WITH_STATIC="no"])
# LINKFORSHARED are the flags passed to the $(CC) command that links
# the executables -- this is only needed for a few systems
AC_MSG_CHECKING(LINKFORSHARED)
if test -z "$LINKFORSHARED"
then
case $ac_sys_system/$ac_sys_release in
AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
next/3*) LINKFORSHARED="-u libsys_s";;
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
IRIX*/6*) LINKFORSHARED="-all";;
esac
fi
AC_MSG_RESULT($LINKFORSHARED)
# ---------- Checks for header files.
# The following tests for Tcl, Python, and Perl are taken from
# the SWIG configure.in file, which in turns borrows some tests
# from the Python configuration.
echo ""
echo "Checking for installed languages."
echo "Note: none of the following packages are required to build PDFlib"
echo ""
#--------------------------------------------------------------------
# Take care of C++
#--------------------------------------------------------------------
# Filter out systems where we don't build the C++ binding
# Quote Detlev Droege: "C++ doesn't work with a real object-oriented
# system such as NeXTStep"
case $ac_sys_system/$ac_sys_release in
NeXT|next/3*) WITH_CXX="no";;
NeXT|next/4*) WITH_CXX="no";;
*) WITH_CXX="yes";;
esac
#--------------------------------------------------------------------
# Try to locate the Java Developers Kit for JNI
#--------------------------------------------------------------------
JAVAINCLUDE=nope
AC_ARG_WITH(java,[ --with-java=path Set location of Java Developers Kit],[
JAVAPACKAGE="$withval"], [JAVAPACKAGE=nope])
if test "$JAVAINCLUDE" = nope; then
if test "$JAVAPACKAGE" != nope; then
JAVAINCLUDE="-I$JAVAPACKAGE/include"
fi
fi
AC_MSG_CHECKING(for Java header files)
if test "$JAVAINCLUDE" = nope; then
AC_TRY_CPP([#include <jni.h>], , JAVAINCLUDE="nope")
if test "$JAVAINCLUDE" = nope; then
dirs="$prefix /usr/lib/java /usr/java /usr/local/java /usr/lib/jdk1.2.1 /usr/lib/jdk1.1.8 /usr/lib/jdk1.1.7 /usr/lib/jdk1.1.6 /usr/lib/jdk1.1.5 /usr/lib/jdk1.1.4 /usr/lib/jdk1.1.3 /usr/local/jdk1.1.2 /usr/local/jdk1.1.1 /usr /opt/local"
for i in $dirs ; do
if test -r $i/include/jni.h; then
AC_MSG_RESULT($i/include)
JAVAINCLUDE="-I$i/include"
break
fi
done
fi
if test "$JAVAINCLUDE" = nope; then
JAVAINCLUDE="-I/usr/local/include"
AC_MSG_RESULT(not found)
else
WITH_JAVA="yes"
if test -r $JAVAINCLUDE/$MACHDEP/jni_md.h; then
JAVAINCLUDE="$JAVAINCLUDE $JAVAINCLUDE/$MACHDEP"
else
JAVAINCLUDE="$JAVAINCLUDE $JAVAINCLUDE/genunix"
fi
fi
else
AC_MSG_RESULT($JAVAINCLUDE)
fi
AC_SUBST(JAVAINCLUDE)
#--------------------------------------------------------------------
# Try to locate the Tcl package
#--------------------------------------------------------------------
TCLINCLUDE=nope
TCLPACKAGEDIR=nope
TCLBIN=nope
AC_ARG_WITH(tcl,[ --with-tcl=path Set location of Tcl executable],[TCLBIN="$withval"],[TCLBIN=nope])
AC_ARG_WITH(tclpkg,[ --with-tclpkg=path Set location of Tcl package install directory],[TCLPACKAGEDIR="$withval"],[TCLPACKAGEDIR=nope])
AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[TCLINCLUDE="-I$withval"],[TCLINCLUDE=nope])
AC_MSG_CHECKING(for Tcl header files)
if test "$TCLINCLUDE" = nope; then
AC_TRY_CPP([#include <tcl.h>], , TCLINCLUDE="nope")
if test "$TCLINCLUDE" = nope; then
dirs="$prefix/include /usr/local/include /usr/include /opt/local/include /home/sci/local/include /usr/pkg/include"
for i in $dirs ; do
if test -r $i/tcl.h; then
AC_MSG_RESULT($i)
TCLINCLUDE="-I$i"
break
fi
done